{% extends "base.html" %}
{% block title %}
「{{ q }}」搜索结果
{% endblock %}
{% block css %}
<link href="/static/editor.md/css/editormd.min.css" rel="stylesheet" />
{% endblock %}
{% block content %}
	<div class="content">
		<div class="content-heading">
			<div class="container container-full">
                <h1 class="heading" align="center">搜索结果</h1>
			</div>
		</div>
        <div class="container container-full">
			<div class="row row-fix">
                <div class="col-md-3 content-fix" align="center">
                    <h2 class="content-sub-heading">Search</h2>
                    <div class="form-group-colour">
                        <form action="{% url 'article:search_article' %}" method="get">
                            <div class="row">
                                <div class="col-md-12">
                                    <input class="form-control" placeholder="输入你想搜索的内容" name="q" type="search">
                                </div>
                            </div>
                        </form>
                    </div>
				</div>
				<div class="col-md-8" >
                    <h2 class="content-sub-heading" align="center">查询到与「{{ q }}」相关的「{{ article_len }}」条结果 </h2>
                    {% for article in articles %}
                    <div class="tile-wrap">
                        <a class="tile" href="{% url 'article:article' id=article.id %}">
                            <div class="tile-inner">
                                <span>{{ article.title }}</span>
                                <span style="float:right">作者：{{ article.author }}</span>
                                <hr>
                                <pre>{{ article.content | slice:":50" | safe }}</pre>
                            </div>
                        </a>
                    </div>
                    {% endfor %}
				</div>
			</div>
		</div>
	</div>
{% endblock %}